package com.haiertvbic.tvwa.util;

import android.view.Display;
import android.view.Gravity;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;

import com.haiertvbic.tvwa.R;
/**
 * 
 * @author 李彬
 *
 */
public class SetActivityView {
	
	public static View setActivityView(Window activity_window,WindowManager window_manager){
        View activity_view = activity_window.getDecorView();
        activity_view.setBackgroundResource(R.drawable.sound_bg);
        activity_view.getBackground().setAlpha(180);

        WindowManager.LayoutParams lp = activity_window.getAttributes(); 
        Display tv_display = window_manager.getDefaultDisplay();
        lp.width = tv_display.getWidth()/4;
        lp.height = tv_display.getHeight()/4*3;
        lp.gravity = Gravity.RIGHT|Gravity.CENTER_VERTICAL; 
        activity_window.setAttributes(lp);
		return activity_view;
	}
}
